import { int, xy, xyz, rgb, rgba } from "./util";

declare enum OSKeyType {
    OSKEY_BACKSPACE,
    OSKEY_TAB,
    OSKEY_CLEAR,
    OSKEY_RETURN,
    OSKEY_SHIFT,
    OSKEY_CONTROL,
    OSKEY_ALT,
    OSKEY_PAUSE,
    OSKEY_CAPSLOCK,
    OSKEY_KANA,
    OSKEY_HANGUL,
    OSKEY_JUNJA,
    OSKEY_FINAL,
    OSKEY_HANJA,
    OSKEY_KANJI,
    OSKEY_ESCAPE,
    OSKEY_CONVERT,
    OSKEY_NONCONVERT,
    OSKEY_ACCEPT,
    OSKEY_MODECHANGE,
    OSKEY_SPACE,
    OSKEY_PAGEUP,
    OSKEY_PAGEDOWN,
    OSKEY_END,
    OSKEY_HOME,
    OSKEY_LEFT,
    OSKEY_UP,
    OSKEY_RIGHT,
    OSKEY_DOWN,
    OSKEY_SELECT,
    OSKEY_PRINT,
    OSKEY_EXECUTE,
    OSKEY_PRINTSCREEN,
    OSKEY_INSERT,
    OSKEY_DELETE,
    OSKEY_HELP,
    OSKEY_0,
    OSKEY_1,
    OSKEY_2,
    OSKEY_3,
    OSKEY_4,
    OSKEY_5,
    OSKEY_6,
    OSKEY_7,
    OSKEY_8,
    OSKEY_9,
    OSKEY_A,
    OSKEY_B,
    OSKEY_C,
    OSKEY_D,
    OSKEY_E,
    OSKEY_F,
    OSKEY_G,
    OSKEY_H,
    OSKEY_I,
    OSKEY_J,
    OSKEY_K,
    OSKEY_L,
    OSKEY_M,
    OSKEY_N,
    OSKEY_O,
    OSKEY_P,
    OSKEY_Q,
    OSKEY_R,
    OSKEY_S,
    OSKEY_T,
    OSKEY_U,
    OSKEY_V,
    OSKEY_W,
    OSKEY_X,
    OSKEY_Y,
    OSKEY_Z,
    OSKEY_LMETA,
    OSKEY_RMETA,
    OSKEY_APPS,
    OSKEY_SLEEP,
    OSKEY_NUMPAD0,
    OSKEY_NUMPAD1,
    OSKEY_NUMPAD2,
    OSKEY_NUMPAD3,
    OSKEY_NUMPAD4,
    OSKEY_NUMPAD5,
    OSKEY_NUMPAD6,
    OSKEY_NUMPAD7,
    OSKEY_NUMPAD8,
    OSKEY_NUMPAD9,
    OSKEY_MULTIPLY,
    OSKEY_ADD,
    OSKEY_SEPARATOR,
    OSKEY_SUBTRACT,
    OSKEY_DECIMAL,
    OSKEY_DIVIDE,
    OSKEY_F1,
    OSKEY_F2,
    OSKEY_F3,
    OSKEY_F4,
    OSKEY_F5,
    OSKEY_F6,
    OSKEY_F7,
    OSKEY_F8,
    OSKEY_F9,
    OSKEY_F10,
    OSKEY_F11,
    OSKEY_F12,
    OSKEY_F13,
    OSKEY_F14,
    OSKEY_F15,
    OSKEY_F16,
    OSKEY_F17,
    OSKEY_F18,
    OSKEY_F19,
    OSKEY_F20,
    OSKEY_F21,
    OSKEY_F22,
    OSKEY_F23,
    OSKEY_F24,
    OSKEY_NUMLOCK,
    OSKEY_SCROLLLOCK,
    OSKEY_OEM_NEC_EQUAL,
    OSKEY_OEM_FJ_JISHO,
    OSKEY_OEM_FJ_MASSHOU,
    OSKEY_OEM_FJ_TOUROKU,
    OSKEY_OEM_FJ_LOYA,
    OSKEY_OEM_FJ_ROYA,
    OSKEY_LSHIFT,
    OSKEY_RSHIFT,
    OSKEY_LCONTROL,
    OSKEY_RCONTROL,
    OSKEY_LALT,
    OSKEY_RALT,
    OSKEY_BROWSER_BACK,
    OSKEY_BROWSER_FORWARD,
    OSKEY_BROWSER_REFRESH,
    OSKEY_BROWSER_STOP,
    OSKEY_BROWSER_SEARCH,
    OSKEY_BROWSER_FAVORITES,
    OSKEY_BROWSER_HOME,
    OSKEY_VOLUME_MUTE,
    OSKEY_VOLUME_DOWN,
    OSKEY_VOLUME_UP,
    OSKEY_MEDIA_NEXT_TRACK,
    OSKEY_MEDIA_PREV_TRACK,
    OSKEY_MEDIA_STOP,
    OSKEY_MEDIA_PLAY_PAUSE,
    OSKEY_LAUNCH_MAIL,
    OSKEY_LAUNCH_MEDIA_SELECT,
    OSKEY_LAUNCH_APP1,
    OSKEY_LAUNCH_APP2,
    OSKEY_OEM_1,
    OSKEY_OEM_PLUS,
    OSKEY_OEM_COMMA,
    OSKEY_OEM_MINUS,
    OSKEY_OEM_PERIOD,
    OSKEY_OEM_2,
    OSKEY_OEM_3,
    OSKEY_OEM_4,
    OSKEY_OEM_5,
    OSKEY_OEM_6,
    OSKEY_OEM_7,
    OSKEY_OEM_8,
    OSKEY_OEM_AX,
    OSKEY_OEM_102,
    OSKEY_ICO_HELP,
    OSKEY_ICO_00,
    OSKEY_PROCESSKEY,
    OSKEY_ICO_CLEAR,
    OSKEY_PACKET,
    OSKEY_OEM_RESET,
    OSKEY_OEM_JUMP,
    OSKEY_OEM_PA1,
    OSKEY_OEM_PA2,
    OSKEY_OEM_PA3,
    OSKEY_OEM_WSCTRL,
    OSKEY_OEM_CUSEL,
    OSKEY_OEM_ATTN,
    OSKEY_OEM_FINISH,
    OSKEY_OEM_COPY,
    OSKEY_OEM_AUTO,
    OSKEY_OEM_ENLW,
    OSKEY_OEM_BACKTAB,
    OSKEY_ATTN,
    OSKEY_CRSEL,
    OSKEY_EXSEL,
    OSKEY_EREOF,
    OSKEY_PLAY,
    OSKEY_ZOOM,
    OSKEY_NONAME,
    OSKEY_PA1,
    OSKEY_OEM_CLEAR
}

function triggerPlayerKey(): oskeytype {
    return BlzGetTriggerPlayerKey();
}
function triggerPlayerMetaKey(): number {
    return BlzGetTriggerPlayerMetaKey();
}
function triggerPlayerIsKeyDown(): boolean {
    return BlzGetTriggerPlayerIsKeyDown();
}

function forceKey(key: string): void {
    ForceUIKey(key);
}
function forceCancel(): void {
    ForceUICancel();
}

function localizedHotkey(source: string): int {
    return GetLocalizedHotkey(source) as int;
}